package PTA;
interface Phone{
    void dial ();
    void location();
    void photo();
    void music();
    void video();
}
abstract class PhoneAdapter implements Phone {
    public void dial (){}
    public void location() {}
    public void photo() {}
    public void music() {}
    public void video() {}
}
class HuawPhone extends PhoneAdapter {
    @Override
    public void dial() {
        System.out.println("华为手机拨打电话。");
    }
    @Override
    public void photo() {
        System.out.println("华为手机拍照。");
    }

    @Override
    public void music() {
        System.out.println("华为手机播放音乐。");
    }

    @Override
    public void video() {
        System.out.println("华为手机播放视频。");
    }
}
class OldPhone extends PhoneAdapter {
    @Override
    public void dial() {
        System.out.println("老人机拨打电话。");
    }

    @Override
    public void location() {
        System.out.println("老人机定位。");
    }
}
public class t7 {
    public static void main(String[] args) {
        print(new OldPhone());
        print(new HuawPhone());
    }
    public static void print(Phone p) {
        p.dial();
        p.location();
        p.photo();
        p.music();
        p.video();
    }
}
